﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="category.ascx.cs" Inherits="Views_module_category" %>
<style type="text/css">
#ja-sidenav { padding: 0; }

#ja-sidenav li {
	margin: 0;
	padding: 0;
	border-bottom: 1px dotted #eaeaea;
	position: relative;
	line-height: 160%;
}

#ja-col2 #ja-sidenav li {
	border-color: #413838;
}

#ja-sidenav li.parrent,
#ja-sidenav li.active {
	background: none !important;
}

#ja-sidenav li a {
	color: #333;
	padding-left: 15px;
	background: url(../images/bullet1.gif) no-repeat left center;
	display: block;
	line-height: 30px;
}

#ja-col2 #ja-sidenav li a {
	color: #d5d5d5;
}

#ja-sidenav li a li a {
	font-weight: normal;
}

#ja-sidenav li a:hover, 
#ja-sidenav li.active a,
#ja-col2 #ja-sidenav li a:hover, 
#ja-col2 #ja-sidenav li.active a,
#ja-sidenav li.selected a {
	text-decoration: none;
	color: #9a2016;
	background-image: url(../images/bullet1-hover.gif);
}

#ja-sidenav li.selected.parent {
	padding: 8px 0 0 0;
}

#ja-sidenav li.over,
#ja-sidenav li.selected,
#ja-sidenav li.active {}

/*1st level and upper*/
#ja-sidenav li ul {
	padding: 0;
	margin-top: 0;
}

#ja-sidenav li li {
	background: none;
	margin: 0;
	overflow: hidden;
	padding: 0;
	border-top: 1px dotted #eaeaea;
	border-bottom: none;
}

#ja-sidenav li li a,
#ja-sidenav li.selected li a,
#ja-sidenav li.active li a,
#ja-sidenav li li.active li a  {
	color: #333;
	background: url(../images/bullet1.gif) no-repeat 15px center;
	display: block;
	outline: none;
	padding: 0 0 0 30px;
	text-decoration: none;
	text-indent: 0;
	line-height: 30px;
}

#ja-col2 #ja-sidenav li li a,
#ja-col2 #ja-sidenav li.selected li a,
#ja-col2 #ja-sidenav li.active li a,
#ja-col2 #ja-sidenav li li.active li a {
	color: #d5d5d5;
	background: url(../images/bullet1.gif) no-repeat 15px center;
}

#ja-sidenav li li a:hover, 
#ja-sidenav li li a:active, 
#ja-sidenav li li a:focus,
#ja-sidenav li li.active li a:hover, 
#ja-sidenav li li.active li a:active, 
#ja-sidenav li li.active li a:focus,
#ja-col2 #ja-sidenav li li a:hover, 
#ja-col2 #ja-sidenav li li a:active, 
#ja-col2 #ja-sidenav li li a:focus,
#ja-col2 #ja-sidenav li li.active li a:hover, 
#ja-col2 #ja-sidenav li li.active li a:active, 
#ja-col2 #ja-sidenav li li.active li a:focus {
	color: #9a2016; 
	background-image: url(../images/bullet1-hover.gif);
}

#ja-sidenav li li.active a,
#ja-col2 #ja-sidenav li li.active a {
	color: #9a2016;
	background-image: url(../images/bullet1-hover.gif);
}

#ja-sidenav li li.last a {
	border: none;
}

#ja-sidenav li ul ul {
	margin: 0;
	padding: 0;
	border-top: 1px dotted #eaeaea;
}

#ja-sidenav li ul ul li {
	border: none;
}

#ja-sidenav li li li a,
#ja-sidenav li.selected li li a,
#ja-sidenav li li.active li li a {
	padding: 0 0 0 40px;
	background-position: 30px center;
}

#ja-sidenav li li li.active a {
	font-weight: bold;
}

#ja-sidenav li li li a:hover,
#ja-sidenav li li li a:focus,
#ja-sidenav li li li a:active,
#ja-sidenav li.selected li li a:hover,
#ja-sidenav li.selected li li a:focus,
#ja-sidenav li.selected li li a:active,
#ja-sidenav li li.active li li a:hover,
#ja-sidenav li li.active li li a:focus,
#ja-sidenav li li.active li li a:active,
#ja-sidenav li li li.active a {
	color: #9a2016;
	background-image: url(../images/bullet1-hover.gif);
}
</style>
<div class="box" id="navBox">
  <div class="header" align="center" style="background:#cecece;corlor:#000;padding:10px 15px">Category</div>
      <div id="category" class="middle">&nbsp;
        <div class="arrowlistmenu">
            <ul id="ja-sidenav">
        <%
            for (int i = 0; i < dt.Rows.Count; i++ )
            {
                %>
                <li id="" class="level0 nav-1 parent">
                <%
                if (dt.Rows[i]["parent_id"].ToString().Equals("0"))
                {
                %>
                    <a href='default.aspx?action=category&id=<%=dt.Rows[i]["category_id"] %>'>
                        <span><%=dt.Rows[i]["category_name"]%></span>
                    </a>
                <%
                }
                
                for (int j = 0; j < dt.Rows.Count; j++)
                {
                    bool check = false;
                    if (dt.Rows[j]["parent_id"].ToString() == dt.Rows[i]["category_id"].ToString())
                    {
                        %>
                            <ul class="level0">
                        <%
                        for (int k = 0; k < dt.Rows.Count; k++ )
                        {
                            if (dt.Rows[k]["parent_id"].ToString() == dt.Rows[i]["category_id"].ToString())
                            {
                                if (k == 0)
                                {
                                    %><li class="level1 nav-1-1 first"><%
                                }
                                else if (k == dt.Rows.Count)
                                {
                                    %><li class="level1 nav-1-1 last"><%
                                }
                                else
                                {
                                    %><li class="level1 nav-1-1"><%
                                }
                                %>                                
                                        <a href='default.aspx?action=category&id=<%=dt.Rows[k]["category_id"] %>'>
                                            <span><%=dt.Rows[k]["category_name"]%></span>
                                        </a>
                                    </li>
                                <%
                            }
                        }
                        %>
                            </ul>
                        <%
                        check = true;
                    }
                    if (check)
                        break;
                }
                %>
                    </li>
                <%
            }
        %>
            </ul>
        </div>&nbsp;
      </div>
  <div class="bottom">&nbsp;</div>
</div>